package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BooksMapper;
import com.ruoyi.system.domain.Books;
import com.ruoyi.system.service.IBooksService;

/**
 * booksService业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-13
 */
@Service
public class BooksServiceImpl implements IBooksService 
{
    @Autowired
    private BooksMapper booksMapper;

    /**
     * 查询books
     * 
     * @param id books主键
     * @return books
     */
    @Override
    public Books selectBooksById(Long id)
    {
        return booksMapper.selectBooksById(id);
    }

    /**
     * 查询books列表
     * 
     * @param books books
     * @return books
     */
    @Override
    public List<Books> selectBooksList(Books books)
    {
        return booksMapper.selectBooksList(books);
    }

    /**
     * 新增books
     * 
     * @param books books
     * @return 结果
     */
    @Override
    public int insertBooks(Books books)
    {
        return booksMapper.insertBooks(books);
    }

    /**
     * 修改books
     * 
     * @param books books
     * @return 结果
     */
    @Override
    public int updateBooks(Books books)
    {
        return booksMapper.updateBooks(books);
    }

    /**
     * 批量删除books
     * 
     * @param ids 需要删除的books主键
     * @return 结果
     */
    @Override
    public int deleteBooksByIds(Long[] ids)
    {
        return booksMapper.deleteBooksByIds(ids);
    }

    /**
     * 删除books信息
     * 
     * @param id books主键
     * @return 结果
     */
    @Override
    public int deleteBooksById(Long id)
    {
        return booksMapper.deleteBooksById(id);
    }
}
